<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
	trimDirectiveWhitespaces="true"%>

<style type="text/css">
/*회원가입 폼 정렬*/
#joinfrm {
	/* border: 1px solid red; */
	width: 365px;
	padding-top: 100px;
}

#joinfrm label {
	width: 120px;
	text-align: right;
	font-weight: bold;
	display: inline-block;
	padding: 0 10px 0 0;
}

#joinfrm div {
	margin: 10px 10px;
}
input{
width:200px;
}
</style>

<div id="contents">
	<h2>:: 회원가입 ::</h2>
	<form name="joinfrm" id="joinfrm" class="centerme">
		<div>
			<label for="userid">아이디</label><input type="text" name="userid"
				id="userid" />
		</div>
		<div>
			<label for="passwd">비밀번호</label><input type="text" name="passwd"
				id="passwd" />
		</div>
		<div>
			<label for="repwd">비밀번호확인</label><input type="text" name="repasswd"
				id="repasswd" />
		</div>
		<div>
			<label for="name">이름</label><input type="text" name="name" id="name" />
		</div>
		<div>
			<label for="email">전자우편</label><input type="email" name="email"
				id="email" />
		</div>
		<div>
			<label></label>
			<button type="button" id="joinokbtn">입력완료</button>
			<button type="reset" id="joinokbtn">다시입력</button>
		</div>
	</form>
</div>

<script type="text/javascript">
	var joinbtn = document.getElementById("joinokbtn");
	joinbtn.onclick = function() {
		joinme();
	};
</script>
<script type="text/javascript">
	function joinme() {
		var joinfrm = document.getElementById("joinfrm");
		if (joinfrm.userid.value == "" && joinfrm.passwd.value == "") {
			alert('아이디,비밀번호를 입력하세요!');
		} else if (joinfrm.userid.value == "") {
			alert('아이디를 입력하세요!!')
		} else if (joinfrm.passwd.value == "") {
			alert('비밀번호를 입력하세요!!')
		} else if (joinfrm.passwd.value != joinfrm.repasswd.value) {
			alert('비밀번호가 다릅니다.');
		} else {
			joinfrm.method = "post";
			joinfrm.action = "?job=join/joinok";
			joinfrm.submit();
		}

	}
</script>
